#include<iostream>
#include<string>
using namespace std;
class Solution {
public:
    bool halvesAreAlike(string s) {
        string a, b;
        int cnt1 = 0;
        int cnt2 = 0;
        a = s.substr(0, s.size() / 2);
        b = s.substr(s.size() / 2);
        string s1 = "aeiouAEIOU";
        for (int i = 0; i < a.size(); i++)
        {
            if (s1.find(a[i]) != string::npos)
                cnt1++;
        }
        for (int i = 0; i < b.size(); i++)
        {
            if (s1.find(b[i]) != string::npos)
                cnt2++;
        }

        return cnt1 == cnt2;
    }
};
int main()
{
    Solution s;
    cout<<s.halvesAreAlike("textbook");
}